This folder contains all of the files needed to run the simulations, replicate the empirical results and create the figures in Cameron Wimpy, Laron K. Williams and Guy D. Whitten, “X Marks the Spot: Unlocking the Treasure of Spatial-X Models.” Journal of Politics.
If you have questions about the reproduction files please contact Laron Williams at williamslaro@missouri.edu.
These files require both Stata
and R
.
In Stata
, you will need the spatwmat
package found by running this code in Stata
:
net install sg162, from("http://www.stata.com/stb/stb60")
In R
, you will need to load (and potentially install from CRAN) the following packages:
foreign
ggplot2
lattice
fields
splines
MASS
gridExtra
The folder contains the following files and structure:
Application folder containing the reproduction materials for the military spending illustration:
Data subfolder contains the following:
Stata
script file to reproduce the weights matrices (Generate Weights Matrices.do
) for the SAR (SAR subfolder) and SAR (SAR subfolder) models.Stata
datasets used to estimate the models AND used to generate the weights matrices (Military Spending--Dyadic.dta
, Military Spending--Monadic.dta
, and Military Spending--Monadic--SLX.dta
)Results subfolder contains the following:
Stata
script file to replicate the empirical results (Military Spending Models.do
)Stata
log file that contains a copy of the replicated empirical results (Military Spending--Results.smcl
)Europe War Illustration.dta
) produced in the Military Spending Models.do
file.Experiments folder containing the replication materials for the simulations based on three sets of data-generating processes: SAR, SEM and SLX:
R
script file (Generate Higher-Order Weights Matrices.R
) that produces the various weights matrices used in the simulations.SAR Monte Carlo Experiments.do
), the dataset containing the simulations (e.g., SAR.dta
), and any other necessary files (e.g., SAR--True Effects.dta
)Stata
dataset containing the simulation results (e.g., Analyze SAR Monte Carlo Experiments.dta
), a script file to summarize the results (Analyze Monte Carlo Experiments.do
) and a Stata
log file showing an exact copy of the summarized simulation results (Analyze SAR Monte Carlo Experiments.smcl
).SAR Programs.do
)Figures folder contains a Stata dataset contains the following:
R
script file to produce Figures 2–4 in the manuscript (Generate WWW Figures.R
)Survey folder contains the following:
Excel
file containing the details of the survey (Spatial Census.xlsx
)Stata
script file producing the patterns in the survey (Analyze Survey.do
)Stata
log file contains a copy of the replicated patterns (Patterns in the Spatial Survey.smcl
)